package com.gitee.qdbp.general.system.web.shiro.simple;

import java.io.Serializable;
import com.gitee.qdbp.base.enums.Gender;
import com.gitee.qdbp.base.system.model.IAccount;
import com.gitee.qdbp.base.system.model.IAccountType;
import com.gitee.qdbp.general.system.api.personnel.model.UserCoreBean;

/**
 * UserInfo转IAccount的包装类
 *
 * @author zhaohuihua
 * @version 160523
 */
public class LoginUser implements IAccount, UserCoreBean.Wrap, Serializable {

    /** 版本序列号 **/
    private static final long serialVersionUID = 7828880894632504373L;

    private UserCoreBean original;

    public LoginUser(UserCoreBean user) {
        this.original = user;
    }

    @Override
    public UserCoreBean original() {
        return original;
    }

    @Override
    public String getTenantCode() {
        return original.getTenantCode();
    }

    @Override
    public IAccountType getUserType() {
        return original.getUserType();
    }

    @Override
    public String getId() {
        return original.getId();
    }

    @Override
    public String getUserCode() {
        return original.getUserCode();
    }

    @Override
    public String getUserName() {
        return original.getUserName();
    }

    @Override
    public String getNickName() {
        return original.getNickName();
    }

    @Override
    public String getRealName() {
        return original.getRealName();
    }

    @Override
    public String getDeptCode() {
        return original.getDeptCode();
    }

    @Override
    public String getPhone() {
        return original.getPhone();
    }

    @Override
    public String getEmail() {
        return original.getEmail();
    }

    @Override
    public Gender getGender() {
        return original.getGender();
    }

    @Override
    public String getPortrait() {
        return original.getPhoto();
    }

    @Override
    public String getDisplayName() {
        return original.toDisplayName();
    }

    public String toString() {
        return original.toString();
    }
}
